package com.alliky.core.api;

import com.alliky.core.entity.BannerEntity;
import com.alliky.core.entity.vo.CategoryVO;
import com.alliky.core.entity.vo.GoodsVO;
import com.alliky.core.entity.vo.UserVO;

import java.util.List;
import java.util.WeakHashMap;

import io.reactivex.Observable;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

public interface ApiService {

    @FormUrlEncoded
    @POST("api/advert/list")
    Observable<List<BannerEntity>> getBanner(@FieldMap WeakHashMap<String, Object> weakHashMap);

    @FormUrlEncoded
    @POST("api/category/list")
    Observable<List<CategoryVO>> getCategory(@FieldMap WeakHashMap<String, Object> weakHashMap);

    @FormUrlEncoded
    @POST("api/goods/hotlist")
    Observable<List<GoodsVO>> getHotGoods(@FieldMap WeakHashMap<String, Object> weakHashMap);

    @FormUrlEncoded
    @POST("api/goods/hotlist")
    Observable<List<GoodsVO>> getRecommendGoods(@FieldMap WeakHashMap<String, Object> weakHashMap);

    @FormUrlEncoded
    @POST("api/user/login")
    Observable<UserVO> login(@FieldMap WeakHashMap<String, Object> weakHashMap);
}
